module.exports = {
    //配置server行为
    devServer: {
        host: 'localhost',
        port: 8080,
        //代理跨域
        proxy: {
            '/api': {
                target: "http://mall-pre.springboot.cn",
                changeOrigin: true, //允许跨域
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    },
    //生产环境soruce map
    productionSourceMap:false,
    //实现路由懒加载
    chainWebpack:config=>{
        config.plugins.delete('prefetch');
    }
};